//
//  SecondLeftCollectionViewCell.swift
//  CJXSwiftStoryboard
//
//  Created by CJX on 2016/10/27.
//  Copyright © 2016年 caijianxi. All rights reserved.
//

import UIKit

class SecondLeftCollectionViewCell: UICollectionViewCell {

    
    @IBOutlet weak var myImgView: UIImageView!
    
    @IBOutlet weak var nameLabel: UILabel!
    
    
    var model : LeftModel?{
        didSet{
            
            myImgView.sd_setImageWithURL(NSURL(string: (model?.categories_image)!), placeholderImage: nil)
            
            nameLabel.text = model?.categories_name
            nameLabel.numberOfLines = 0
           
            
        }
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        
        if SCREEN_WIDTH == 320 {
            nameLabel.font = UIFont.systemFontOfSize(9)
        }else if SCREEN_WIDTH > 320 && SCREEN_WIDTH < 430 {
            nameLabel.font = UIFont.systemFontOfSize(11)
        }else{
            nameLabel.font = UIFont.systemFontOfSize(13)
        }
        // Initialization code
    }

}
